<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .wai{
            margin: 100px auto;
            width: 200px;
            height: 200px;
            position: relative;
            transform-style: preserve-3d;
            transition: all 2s;
        }
        .wai:hover{
            transform: rotate3d(1,1,0,360deg);
        }
        .zuo{
            width: 200px;
            height: 200px;
            background-color: gold;
            position: absolute;
            right: 100px;
            opacity: 50%;
            transform: rotate3d(0,1,0,90deg);
        }
        .you{
            width: 200px;
            height: 200px;
            background-color: greenyellow;
            position: absolute;
            left: 100px;
            opacity: 50%;
            transform: rotate3d(0,1,0,90deg);
        }
        .shang{
            width: 200px;
            height: 200px;
            background-color: hotpink;
            position: absolute;
            bottom: 100px;
            opacity: 50%;
            transform: rotate3d(1,0,0,90deg);
        }
        .xia{
            width: 200px;
            height: 200px;
            background-color: blue;
            position: absolute;
            top: 100px;
            opacity: 50%;
            transform: rotate3d(1,0,0,90deg);
        }
        .di{
            width: 200px;
            height: 200px;
            opacity: 50%;
            background-color: cadetblue;
            transform: translateZ(100px);
        }
        .mian{
            width: 200px;
            height: 200px;
            background-color: red;
            position: absolute;
            top: 0;
            opacity: 50%;
            transform: translateZ(-100px);
        }
    </style>
</head>
<body>
    <div class="wai">
        <div class="zuo"></div>
        <div class="you"></div>
        <div class="shang"></div>
        <div class="xia"></div>
        <div class="di"></div>
        <div class="mian"></div>
    </div>
</body>
</html>